{"ast":null,"code":"import { genComponentStyleHook, mergeToken } from '../../theme/internal';\nimport { resetComponent } from '../../style';\nconst genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({\n  backgroundColor: bgColor,\n  border: `${token.lineWidth}px ${token.lineType} ${borderColor}`,\n  [`${alertCls}-icon`]: {\n    color: iconColor\n  }\n});\nexport const genBaseStyle = token => {\n  const {\n    componentCls,\n    motionDurationSlow: duration,\n    marginXS,\n    marginSM,\n    fontSize,\n    fontSizeLG,\n    lineHeight,\n    borderRadiusLG: borderRadius,\n    motionEaseInOutCirc,\n    alertIconSizeLG,\n    colorText,\n    paddingContentVerticalSM,\n    alertPaddingHorizontal,\n    paddingMD,\n    paddingContentHorizontalLG\n  } = token;\n  return {\n    [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n      position: 'relative',\n      display: 'flex',\n      alignItems: 'center',\n      padding: `${paddingContentVerticalSM}px ${alertPaddingHorizontal}px`,\n      wordWrap: 'break-word',\n      borderRadius,\n      '&&-rtl': {\n        direction: 'rtl'\n      },\n      [`${componentCls}-content`]: {\n        flex: 1,\n        minWidth: 0\n      },\n      [`${componentCls}-icon`]: {\n        marginInlineEnd: marginXS,\n        lineHeight: 0\n      },\n      [`&-description`]: {\n        display: 'none',\n        fontSize,\n        lineHeight\n      },\n      '&-message': {\n        color: colorText\n      },\n      '&&-motion-leave': {\n        overflow: 'hidden',\n        opacity: 1,\n        transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},\n        padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},\n        margin-bottom ${duration} ${motionEaseInOutCirc}`\n      },\n      '&&-motion-leave-active': {\n        maxHeight: 0,\n        marginBottom: '0 !important',\n        paddingTop: 0,\n        paddingBottom: 0,\n        opacity: 0\n      }\n    }),\n    [`${componentCls}-with-description`]: {\n      alignItems: 'flex-start',\n      paddingInline: paddingContentHorizontalLG,\n      paddingBlock: paddingMD,\n      [`${componentCls}-icon`]: {\n        marginInlineEnd: marginSM,\n        fontSize: alertIconSizeLG,\n        lineHeight: 0\n      },\n      [`${componentCls}-message`]: {\n        display: 'block',\n        marginBottom: marginXS,\n        color: colorText,\n        fontSize: fontSizeLG\n      },\n      [`${componentCls}-description`]: {\n        display: 'block'\n      }\n    },\n    [`${componentCls}-banner`]: {\n      marginBottom: 0,\n      border: '0 !important',\n      borderRadius: 0\n    }\n  };\n};\nexport const genTypeStyle = token => {\n  const {\n    componentCls,\n    colorSuccess,\n    colorSuccessBorder,\n    colorSuccessBg,\n    colorWarning,\n    colorWarningBorder,\n    colorWarningBg,\n    colorError,\n    colorErrorBorder,\n    colorErrorBg,\n    colorInfo,\n    colorInfoBorder,\n    colorInfoBg\n  } = token;\n  return {\n    [componentCls]: {\n      '&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),\n      '&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),\n      '&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),\n      '&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {\n        [`${componentCls}-description > pre`]: {\n          margin: 0,\n          padding: 0\n        }\n      })\n    }\n  };\n};\nexport const genActionStyle = token => {\n  const {\n    componentCls,\n    iconCls,\n    motionDurationMid,\n    marginXS,\n    fontSizeIcon,\n    colorIcon,\n    colorIconHover\n  } = token;\n  return {\n    [componentCls]: {\n      [`&-action`]: {\n        marginInlineStart: marginXS\n      },\n      [`${componentCls}-close-icon`]: {\n        marginInlineStart: marginXS,\n        padding: 0,\n        overflow: 'hidden',\n        fontSize: fontSizeIcon,\n        lineHeight: `${fontSizeIcon}px`,\n        backgroundColor: 'transparent',\n        border: 'none',\n        outline: 'none',\n        cursor: 'pointer',\n        [`${iconCls}-close`]: {\n          color: colorIcon,\n          transition: `color ${motionDurationMid}`,\n          '&:hover': {\n            color: colorIconHover\n          }\n        }\n      },\n      '&-close-text': {\n        color: colorIcon,\n        transition: `color ${motionDurationMid}`,\n        '&:hover': {\n          color: colorIconHover\n        }\n      }\n    }\n  };\n};\nexport const genAlertStyle = token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)];\nexport default genComponentStyleHook('Alert', token => {\n  const {\n    fontSizeHeading3\n  } = token;\n  const alertToken = mergeToken(token, {\n    alertIconSizeLG: fontSizeHeading3,\n    alertPaddingHorizontal: 12 // Fixed value here.\n  });\n\n  return [genAlertStyle(alertToken)];\n});","map":{"version":3,"names":["genComponentStyleHook","mergeToken","resetComponent","genAlertTypeStyle","bgColor","borderColor","iconColor","token","alertCls","backgroundColor","border","lineWidth","lineType","color","genBaseStyle","componentCls","motionDurationSlow","duration","marginXS","marginSM","fontSize","fontSizeLG","lineHeight","borderRadiusLG","borderRadius","motionEaseInOutCirc","alertIconSizeLG","colorText","paddingContentVerticalSM","alertPaddingHorizontal","paddingMD","paddingContentHorizontalLG","Object","assign","position","display","alignItems","padding","wordWrap","direction","flex","minWidth","marginInlineEnd","overflow","opacity","transition","maxHeight","marginBottom","paddingTop","paddingBottom","paddingInline","paddingBlock","genTypeStyle","colorSuccess","colorSuccessBorder","colorSuccessBg","colorWarning","colorWarningBorder","colorWarningBg","colorError","colorErrorBorder","colorErrorBg","colorInfo","colorInfoBorder","colorInfoBg","margin","genActionStyle","iconCls","motionDurationMid","fontSizeIcon","colorIcon","colorIconHover","marginInlineStart","outline","cursor","genAlertStyle","fontSizeHeading3","alertToken"],"sources":["/data/messenger.client/node_modules/antd/es/alert/style/index.js"],"sourcesContent":["import { genComponentStyleHook, mergeToken } from '../../theme/internal';\nimport { resetComponent } from '../../style';\nconst genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({\n  backgroundColor: bgColor,\n  border: `${token.lineWidth}px ${token.lineType} ${borderColor}`,\n  [`${alertCls}-icon`]: {\n    color: iconColor\n  }\n});\nexport const genBaseStyle = token => {\n  const {\n    componentCls,\n    motionDurationSlow: duration,\n    marginXS,\n    marginSM,\n    fontSize,\n    fontSizeLG,\n    lineHeight,\n    borderRadiusLG: borderRadius,\n    motionEaseInOutCirc,\n    alertIconSizeLG,\n    colorText,\n    paddingContentVerticalSM,\n    alertPaddingHorizontal,\n    paddingMD,\n    paddingContentHorizontalLG\n  } = token;\n  return {\n    [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n      position: 'relative',\n      display: 'flex',\n      alignItems: 'center',\n      padding: `${paddingContentVerticalSM}px ${alertPaddingHorizontal}px`,\n      wordWrap: 'break-word',\n      borderRadius,\n      '&&-rtl': {\n        direction: 'rtl'\n      },\n      [`${componentCls}-content`]: {\n        flex: 1,\n        minWidth: 0\n      },\n      [`${componentCls}-icon`]: {\n        marginInlineEnd: marginXS,\n        lineHeight: 0\n      },\n      [`&-description`]: {\n        display: 'none',\n        fontSize,\n        lineHeight\n      },\n      '&-message': {\n        color: colorText\n      },\n      '&&-motion-leave': {\n        overflow: 'hidden',\n        opacity: 1,\n        transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},\n        padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},\n        margin-bottom ${duration} ${motionEaseInOutCirc}`\n      },\n      '&&-motion-leave-active': {\n        maxHeight: 0,\n        marginBottom: '0 !important',\n        paddingTop: 0,\n        paddingBottom: 0,\n        opacity: 0\n      }\n    }),\n    [`${componentCls}-with-description`]: {\n      alignItems: 'flex-start',\n      paddingInline: paddingContentHorizontalLG,\n      paddingBlock: paddingMD,\n      [`${componentCls}-icon`]: {\n        marginInlineEnd: marginSM,\n        fontSize: alertIconSizeLG,\n        lineHeight: 0\n      },\n      [`${componentCls}-message`]: {\n        display: 'block',\n        marginBottom: marginXS,\n        color: colorText,\n        fontSize: fontSizeLG\n      },\n      [`${componentCls}-description`]: {\n        display: 'block'\n      }\n    },\n    [`${componentCls}-banner`]: {\n      marginBottom: 0,\n      border: '0 !important',\n      borderRadius: 0\n    }\n  };\n};\nexport const genTypeStyle = token => {\n  const {\n    componentCls,\n    colorSuccess,\n    colorSuccessBorder,\n    colorSuccessBg,\n    colorWarning,\n    colorWarningBorder,\n    colorWarningBg,\n    colorError,\n    colorErrorBorder,\n    colorErrorBg,\n    colorInfo,\n    colorInfoBorder,\n    colorInfoBg\n  } = token;\n  return {\n    [componentCls]: {\n      '&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),\n      '&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),\n      '&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),\n      '&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {\n        [`${componentCls}-description > pre`]: {\n          margin: 0,\n          padding: 0\n        }\n      })\n    }\n  };\n};\nexport const genActionStyle = token => {\n  const {\n    componentCls,\n    iconCls,\n    motionDurationMid,\n    marginXS,\n    fontSizeIcon,\n    colorIcon,\n    colorIconHover\n  } = token;\n  return {\n    [componentCls]: {\n      [`&-action`]: {\n        marginInlineStart: marginXS\n      },\n      [`${componentCls}-close-icon`]: {\n        marginInlineStart: marginXS,\n        padding: 0,\n        overflow: 'hidden',\n        fontSize: fontSizeIcon,\n        lineHeight: `${fontSizeIcon}px`,\n        backgroundColor: 'transparent',\n        border: 'none',\n        outline: 'none',\n        cursor: 'pointer',\n        [`${iconCls}-close`]: {\n          color: colorIcon,\n          transition: `color ${motionDurationMid}`,\n          '&:hover': {\n            color: colorIconHover\n          }\n        }\n      },\n      '&-close-text': {\n        color: colorIcon,\n        transition: `color ${motionDurationMid}`,\n        '&:hover': {\n          color: colorIconHover\n        }\n      }\n    }\n  };\n};\nexport const genAlertStyle = token => [genBaseStyle(token), genTypeStyle(token), genActionStyle(token)];\nexport default genComponentStyleHook('Alert', token => {\n  const {\n    fontSizeHeading3\n  } = token;\n  const alertToken = mergeToken(token, {\n    alertIconSizeLG: fontSizeHeading3,\n    alertPaddingHorizontal: 12 // Fixed value here.\n  });\n\n  return [genAlertStyle(alertToken)];\n});"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,UAAU,QAAQ,sBAAsB;AACxE,SAASC,cAAc,QAAQ,aAAa;AAC5C,MAAMC,iBAAiB,GAAG,CAACC,OAAO,EAAEC,WAAW,EAAEC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,MAAM;EAC/EC,eAAe,EAAEL,OAAO;EACxBM,MAAM,EAAG,GAAEH,KAAK,CAACI,SAAU,MAAKJ,KAAK,CAACK,QAAS,IAAGP,WAAY,EAAC;EAC/D,CAAE,GAAEG,QAAS,OAAM,GAAG;IACpBK,KAAK,EAAEP;EACT;AACF,CAAC,CAAC;AACF,OAAO,MAAMQ,YAAY,GAAGP,KAAK,IAAI;EACnC,MAAM;IACJQ,YAAY;IACZC,kBAAkB,EAAEC,QAAQ;IAC5BC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,UAAU;IACVC,cAAc,EAAEC,YAAY;IAC5BC,mBAAmB;IACnBC,eAAe;IACfC,SAAS;IACTC,wBAAwB;IACxBC,sBAAsB;IACtBC,SAAS;IACTC;EACF,CAAC,GAAGxB,KAAK;EACT,OAAO;IACL,CAACQ,YAAY,GAAGiB,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE/B,cAAc,CAACK,KAAK,CAAC,CAAC,EAAE;MACtE2B,QAAQ,EAAE,UAAU;MACpBC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,OAAO,EAAG,GAAET,wBAAyB,MAAKC,sBAAuB,IAAG;MACpES,QAAQ,EAAE,YAAY;MACtBd,YAAY;MACZ,QAAQ,EAAE;QACRe,SAAS,EAAE;MACb,CAAC;MACD,CAAE,GAAExB,YAAa,UAAS,GAAG;QAC3ByB,I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